package com.jintian.smart.kernel.core.flow;

import com.jintian.smart.kernel.core.annotation.flow.FlowOperate;
import com.jintian.smart.kernel.core.annotation.flow.TaskOperate;

import java.util.Map;

public interface IProcessOperation<T> {
    @FlowOperate
    IProcessAction<?> getAction(FlowAction flowAction);

    @FlowOperate
    void suspend(String processInstanceId, ProcessControl ProcessControl) throws Exception;

    @FlowOperate
    void resume(String processInstanceId, ProcessControl ProcessControl) throws Exception;

    @FlowOperate
    void abort(String processInstanceId, ProcessControl ProcessControl) throws Exception;

    @FlowOperate
    void delete(String processInstanceId, ProcessControl ProcessControl) throws Exception;

    @FlowOperate
    void delete(String bizId, String bizClass, String process) throws Exception;

    void empty();

    void registerProcessAction(FlowAction action, IProcessAction<?> taskAction);

    @TaskOperate(value = 0, flowActionIndex = 1)
    ProcessControl queryProcessControl(String taskId, String action, Map<String, Object> transientVariables) throws Exception;
}
